package com.movie.ticket.sale.movieinterface.aheadcontroller;

import com.movie.ticket.sale.movieinterface.common.Result;
import com.movie.ticket.sale.movieinterface.parm.Discount;
import com.movie.ticket.sale.movieinterface.parm.Movie;
import com.movie.ticket.sale.movieinterface.parm.MoviePram;
import com.movie.ticket.sale.movieinterface.parm.Person;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @BelongsProject: movie-interface
 * @BelongsPackage: com.movie.ticket.sale.movieinterface.aheadcontroller
 * @Author: lyl
 * @CreateTime: 2020-12-03 16:37
 * @Description:
 */
@RestController("movie/boss")
@Api(tags = "BOSS操作(boss)",description = "平台管理，封禁，合同审核，发布活动等功能")
public class BossController {
    /**
     *作者:木子
     *方法：查看所有的影院
     *参数：
     *返回值:影院列表
     */
    @ApiOperation("查看自己平台下所有的影院")
    @GetMapping("getCinemas")
    public Result getCinemas(){
        return Result.success(null);
    }
    /**
     *作者:木子
     *方法：展示所有电影订单
     *参数：
     *返回值: 电影订单列表
     */
    @ApiOperation("查看所有的电影票订单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getOrders")
    public Result getOrders(@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }
    /**
     *作者:木子
     *方法：展示用户
     *参数：
     *返回值: 用户列表
     */
    @ApiOperation("查看所有的用户")
    @GetMapping("getUsers")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    public Result getUser(@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }
    /**
     *作者:木子
     *方法：
     *参数：
     *返回值:
     */
    @ApiOperation("查看所有的用户中会员的比例")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "tel",value = "手机号码",dataType="String"),
//            @ApiImplicitParam(name = "password",value = "密码",dataType="String"),
//            @ApiImplicitParam(name = "code",value = "手机验证码",dataType="String")
//    })
    @GetMapping("isVip")
    public Result isVip(){
        return Result.success(null);
    }

    /**
    *作者:木子
    *方法： 同意影院入住：审核合同 修改影院的状态为成功
    *参数：cinemaId
    *返回值:
    */
    @ApiOperation("审核合同 签约成功 修改影院的状态")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的ID",dataType="String"),
            @ApiImplicitParam(name = "massage",value = "自定义通知信息",dataType="String"),
    })
    @PostMapping("isCinema")
    public Result isCinema(@RequestParam("cinemaId")int cinemaId,@RequestParam("massage")String massage){
        return Result.success();
    }
    /**
    *作者:木子
    *方法：不同意影院入住 ：审核合同 修改影院的状态为失败
    *参数：cinemaId
    *返回值:
    */
    @ApiOperation("签约失败 修改影院/院线的状态")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的ID",dataType="String"),
            @ApiImplicitParam(name = "massage",value = "自定义通知信息",dataType="String"),
    })
    @PostMapping("noCinema")
    public Result noCinema(@RequestParam("cinemaId")int cinemaId,@RequestParam("massage")String massage){
        return Result.fail(222,"申请失败");
    }
    /**
    *作者:木子
    *方法：关闭违规影院/院线
    *参数： cinemaId
    *返回值:
    */
    @ApiOperation("关闭影院/院线，通过影院保存的电话号码发送信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的ID",dataType="String"),
            @ApiImplicitParam(name = "massage",value = "自定义通知信息",dataType="String"),

    })
    @PostMapping("deleteCinema")
    public Result deleteCinema(@RequestParam("cinemaId")int cinemaId,@RequestParam("massage")String massage){
        return Result.success();
    }
    /**
    *作者:木子
    *方法：查询某个影院/院线合同
    *参数： cinemaId
    *返回值:
    */
    @ApiOperation("查询影院合同")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的ID",dataType="String"),
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")

    })
    @GetMapping("getContracts")
    public Result getContracts(@RequestParam("cinemaId")int cinemaId,@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询正在申请影院/院线
     *参数：
     *返回值:
     */
    @ApiOperation("查询正在申请的影院")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getIsCinemas")
    public Result getIsCinemas(@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询某个用户的会员
     *参数：
     *返回值:
     */
    @ApiOperation("查询某个用户的会员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId",value = "用户的ID",dataType="String"),
    })
    @PostMapping("getUserVip")
    public Result getUserVip(@RequestParam("userId")int userId){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询所有的优惠券活动
     *参数：
     *返回值:
     */
    @ApiOperation("查询所有的优惠券活动")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getDiscounts")
    public Result getDiscounts(@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询某个用户的积分
     *参数：
     *返回值:
     */
    @ApiOperation("查询某会员的积分")
    @GetMapping("getPoints")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId",value = "用户的ID",dataType="String"),
    })
    public Result getPoints(@RequestParam("userId")int userId){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询某个用户的优惠券
     *参数：
     *返回值:
     */
    @ApiOperation("查询某会员的优惠券")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId",value = "用户的ID",dataType="String"),
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getUserDiscounts")
    public Result getUserDiscounts(@RequestParam("userId")int userId,@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询所有的影院
     *参数：
     *返回值:
     */
    @ApiOperation("查询所有的影院")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getAllCinemas")
    public Result getAllCinemas(@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }
    /**
     *作者:木子
     *方法：查询某个影院的详细信息
     *参数：
     *返回值:
     */
    @ApiOperation("查询某个影院的详细信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的Id",dataType="String"),
    })
    @GetMapping("getAllCinema")
    public Result getOCinema(@RequestParam("cinemaId")int cinemaId){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询某个影院的投诉信息
     *参数：
     *返回值:
     */
    @ApiOperation("查询某个影院的投诉信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的Id",dataType="String"),
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getComplaints")
    public Result getComplaints(@RequestParam("cinemaId")int cinemaId,@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询某个用户的所有订单
     *参数：
     *返回值:
     */
    @ApiOperation("查询某个用户的所有订单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId",value = "用户的ID",dataType="String"),
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getUserOrder")
    public Result getUserOrder(@RequestParam("userId")int userId,@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：查询某个影院的所有订单
     *参数：
     *返回值:
     */
    @ApiOperation("查询某个影院的所有订单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cinemaId",value = "影院的Id",dataType="String"),
            @ApiImplicitParam(name = "currPage",value = "当前页码",dataType = "String"),
            @ApiImplicitParam(name = "number",value = "每页展示数量",dataType = "String")
    })
    @GetMapping("getCinemaOrder")
    public Result getCinemaOrder(@RequestParam("cinemaId")int cinemaId,@RequestParam(defaultValue = "1")int currPage,@RequestParam(defaultValue = "5")int number){
        return Result.success(null);
    }

    /**
     *作者:木子
     *方法：设置添加优惠券活动
     *参数：
     *返回值:
     */
    @ApiOperation("设置添加优惠券活动")
    @PostMapping("addDiscount")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "amount",value = "活动项目名称",dataType="String"),
            @ApiImplicitParam(name = "points",value = "该活动兑换需要的积分",dataType="String"),
            @ApiImplicitParam(name = "endDate",value = "过期时间yyyy-MM-dd",dataType="String"),
    })
    public Result addDiscount(Discount  discount){
        return Result.success();
    }
    /**
     *作者:木子
     *方法：修改优惠券活动
     *参数：
     *返回值:
     */
    @ApiOperation("修改优惠券活动")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "discountId",value = "优惠券Id",dataType="String")
    })
    @PutMapping("changeDiscount")
    public Result changeDiscount( @RequestParam("discountId")int discountId){
        return Result.success();
    }

    /**
     *作者:木子
     *方法：删除某个优惠券活动
     *参数：
     *返回值:
     */
    @ApiOperation("删除某个优惠券活动")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "discountId",value = "优惠券Id",dataType="String")
    })
    @PutMapping("deleteDiscount")
    public Result deleteDiscount( @RequestParam("discountId")int discountId){
        return Result.success();
    }

    /**
     *作者:木子
     *方法：添加一个影片
     *参数：
     *返回值:
     */
    @ApiOperation("添加一个影片")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Movie",value = "除去id的movie对象",dataType="String"),
            @ApiImplicitParam(name = "name",value = "电影名字",dataType="String"),
            @ApiImplicitParam(name = "type",value = "类型",dataType="String"),
            @ApiImplicitParam(name = "introduce",value = "电影简介",dataType="String"),
            @ApiImplicitParam(name = "time",value = "电影时长 单位分钟",dataType="String"),
            @ApiImplicitParam(name = "boxOffice",value = "电影票房",dataType="String"),
            @ApiImplicitParam(name = "movieGrade",value = "评分1-10 1位小数",dataType="String"),
            @ApiImplicitParam(name = "releaseDate",value = "上映时间 yyyy-MM-dd",dataType="String"),
    })
    @PostMapping("addMovie")
    public Result addMovie(Movie Movie){
        return Result.success();
    }
    /**
    *作者:木子
    *方法：上传一个电影的文件 剧照 照片。。。
    *参数：
    *返回值:
    */
    @ApiOperation("添加一个影片的图片信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "movieId",value = "电影的id",dataType="String"),
            @ApiImplicitParam(name = "filePath",value = "文件路径数组",dataType="String"),
            @ApiImplicitParam(name = "type",value = "文件类型 0：封面（只需上传一张）1：剧照",dataType="String"),
    })
    @PostMapping("addMovieData")
    public Result addMovieData(@RequestParam("movieId")int movieId,@RequestParam("filePath")MultipartFile[] filePath,@RequestParam("type")int type){
        return Result.success();
    }
    /**
     *作者:木子
     *方法：上传一个电影的文件 剧照 照片。。。
     *参数：
     *返回值:
     */
    @ApiOperation("添加人物信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "人物姓名",dataType="String"),
            @ApiImplicitParam(name = "introduce",value = "人物介绍",dataType="String"),
            @ApiImplicitParam(name = "sex",value = "人物性别",dataType="String"),
            @ApiImplicitParam(name = "country",value = "国籍",dataType="String"),
            @ApiImplicitParam(name = "nation",value = "民族",dataType="String"),
            @ApiImplicitParam(name = "college",value = "毕业院校",dataType="String"),
            @ApiImplicitParam(name = "company",value = "所属公司",dataType="String"),
    })
    @PostMapping("addPerson")
    public Result addPerson(Person person){
        return Result.success();
    }
    /**
     *作者:木子
     *方法：上传人物照片。。。
     *参数：
     *返回值:
     */
    @ApiOperation("添加人物照片文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "personId",value = "演职人员id",dataType="String"),
            @ApiImplicitParam(name = "path",value = "一张照片对应一个路径",dataType="String"),
    })
    @PostMapping("addPersonData")
    public Result addPersonData(@RequestParam("personId")int personId,@RequestParam("path")MultipartFile path){
        return Result.success();
    }
    /**
     *作者:木子
     *方法：添加影片人员照片对应关系/设置导演 演员
     *参数：
     *返回值:
     */
    @ApiOperation("添加影片人员照片对应关系/设置导演 演员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "movieId",value = "对应的电影id",dataType="String"),
            @ApiImplicitParam(name = "personId",value = "对应的人物id",dataType="String"),
            @ApiImplicitParam(name = "type",value = "0：演员 1:导演",dataType="String")
    })
    @PostMapping("addMoviePerson")
    public Result addMoviePerson(@RequestParam("movieId")int movieId,@RequestParam("personId")int personId){
        return Result.success();
    }

    /**
     *作者:木子
     *方法：修改电影人物照片
     *参数：
     *返回值:
     */
    @ApiOperation("修改电影人物照片：删除一个绑定")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "需要删除的绑定id",dataType="String"),
    })
    @PostMapping("changeMoviePerson")
    public Result changeMoviePerson(@RequestParam("id")int id){
        return Result.success();
    }



    /**
     *作者:木子
     *方法：修改一个影片
     *参数：
     *返回值:
     */
    @ApiOperation("修改一个影片")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "MoviePram",value = "需要修改的movie对象",dataType="String"),
            @ApiImplicitParam(name = "MovieId",value = "需要修改的电影id",dataType="String"),
            @ApiImplicitParam(name = "name",value = "电影名字",dataType="String"),
            @ApiImplicitParam(name = "type",value = "类型",dataType="String"),
            @ApiImplicitParam(name = "introduce",value = "电影简介",dataType="String"),
            @ApiImplicitParam(name = "time",value = "电影时长 单位分钟",dataType="String"),
            @ApiImplicitParam(name = "boxOffice",value = "电影票房",dataType="String"),
            @ApiImplicitParam(name = "movieGrade",value = "评分1-10 1位小数",dataType="String"),
            @ApiImplicitParam(name = "releaseDate",value = "上映时间 yyyy-MM-dd",dataType="String"),

    })
    @PostMapping("changeMovie")
    public Result changeMovie(MoviePram moviePram){
        return Result.success();
    }

    /**
     *作者:木子
     *方法：下架一个影片
     *参数：
     *返回值:
     */
    @ApiOperation("下架一个影片")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tMovieId",value = "电影id",dataType="String")
    })
    @PostMapping("deleteMovie")
    public Result deleteMovie(@RequestParam("tMovieId")int tMovieId){
        return Result.success();
    }

    /**
    *作者:木子
    *方法：添加员工和影院
    *参数： 员工  合同文件
    *返回值:
    */
    @ApiOperation("下架一个影片")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "员工姓名",dataType="String"),
            @ApiImplicitParam(name = "files",value = "文件路径",dataType="String")

    })
    @PostMapping("addFiles")
    public Result addFiles(@RequestParam("name")String name,@RequestParam("files") MultipartFile files){
        return Result.success();
    }




}
